/*
package com.duowan.realtime.dao.impl;

import com.duowan.common.redis.RedisDaoSupport;
import com.duowan.realtime.dao.RealTimeRedisDao;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collections;
import java.util.Set;

*/
/**
 * @version 1.0
 * @author: tangsicheng
 * @date: 14-8-12
 * @since 1.0
 *//*

public class RealTimeRedisDaoImpl extends RedisDaoSupport implements RealTimeRedisDao {
    private static final Logger logger = LoggerFactory.getLogger(RealTimeRedisDaoImpl.class);

    @Override
    public Set<String> getKeysByRegx(String regx) {
        if (StringUtils.isBlank(regx)) {
            return Collections.emptySet();
        }
        return getRedisTemplate().keys(regx);
    }

    @Override
    public int getKpiValue(String key) {

        if (StringUtils.isNotBlank(key)) {
            String result = getRedisTemplate().get(key);
            try {
                return Integer.parseInt(result);
            } catch (NumberFormatException e) {
                logger.error("redis kpivalue转换失败, key:" + key + " value:" + result);
                return -1;
            }
        }
        return -1;
    }

    @Override
    public String get(String key) {
        if (StringUtils.isNotBlank(key)) {
            return getRedisTemplate().get(key);
        }
        return null;
    }


}
*/
